<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    .one{
        width: 100px;
        height: 100px;
        background: red;
       
    }
    @keyframes animated{
        0%{
            transform:rotate(0deg)
            /* rotate 旋转 */
        }
        50%{
            transfrom:rotate(180deg)
        }
        100%{
            transform:rotate(360deg)
        }
    
    }
    .one:hover{
        animation:animated 2s linear infinite;
    }
    </style>
</head>
<body>
    <div class="one">

    </div>
</body>
</html>